﻿@{
    ViewBag.Title = "我的生活+";

}

<div class=" container">
    <div class="row" id="bh">
    </div>
</div>


@section Scripts {
    <script>
        $(function () {
            var url = '@ViewData["url"].ToString()';
            var pcode = '@ViewData["pcode"].ToString()';

            $.getJSON(url + "/api/ProductsApi/" + pcode, function (data) {
                var html = "";
                html += '<div class="col-xs-12 col-sm-12 col-md-12"><div class="thumbnail">';
                html += '<img src="' + url + '/UploadFiles/' + data.ImgUrl + '" alt="通用的占位符缩略图">';
                html += '</div>';
                html += '<div class="caption">';
                html += '<h4>' + data.ProdcutName + '</h4>';
                html += '<p>价格：￥：' + data.DynamicPrice + '</p>';
                html += '<p>';
                html += '<a href="#" class="btn btn-primary" role="button">';
                html += '添加到购物车';
                html += '</a> <a href="/Home/Cart/" class="btn btn-success" role="button">我的购物车 </a> </p>';
                html += '</div></div>';


                $("#bh").empty().append(html);
            });
        });
    </script>
}


